<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="ca.etsmtl.log720.equipe03.beans.InfractionBean" %>
<%@page import="ca.etsmtl.log720.equipe03.roles.ModulesRoles" %>
<%@page import="java.util.*" %>
<%if(!ModulesRoles.getInstance().isUserAuthorized(ModulesRoles.CONSULTATION_INFRACTIONS,request))
{
%>
	<jsp:forward page="../index.jsp"/>
<%
}
%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title><fmt:message key="title" /></title>
  </head>
  <body>
    <h1><fmt:message key="consulterinfractions.heading" /></h1>
  
  	<a href="index.jsp"><fmt:message key="menuprincipal" /></a>
    <a href="index.jsp?logoff=true"><fmt:message key="deconnection" /></a>
    <%
    if(ModulesRoles.getInstance().isUserAuthorized(ModulesRoles.AJOUT_D_UNE_INFRACTION,request))
    {
    %>
    	<a href="insererinfraction.htm"><fmt:message key="insererinfraction.heading" /></a><br />
    <%
    }
    %>
    
    
    <table width="100%" border="1">
      <tr>
        <th>ID</th>
        <th>Description</th>
        <th>Niveau</th>
      </tr>
      <c:forEach items="${model.infractions}" var="infraction">
        <tr>
          <td><c:out value="${infraction.id}" /></td>
          <td><c:out value="${infraction.description}" /></td>
          <td><c:out value="${infraction.niveau}" /></td>
	    </tr>
      </c:forEach>
    </table>
    
  </body>
</html>